Skip to content

Fix misspelled 'embedded' state key in reverse framing - #379

Merged
mielvds merged 3 commits into
digitalbazaar:masterfrom
afeefaa333:fix/reverse-embed-never-typo
Nov 17, 2026
Merged

mielvds merged 3 commits into
digitalbazaar:masterfrom
afeefaa333:fix/reverse-embed-never-typo

Conversation

@afeefaa333

Copy link
Copy Markdown
Contributor

Issue

Fixes #378

Framing with {"@embed": "@never"} on a reverse property (inside an
@reverse frame) was silently ignored, causing the matched node to be
fully embedded instead of referenced by @id only. Forward properties
with the same flag worked correctly.

Root Cause

The reverse-framing branch set a state key as 'embeded' (typo) instead
of 'embedded'. The @never check elsewhere reads state['embedded'],
so the flag set in the reverse branch was never actually read, causing
reverse-framed nodes to be treated as top-level nodes where @never
doesn't apply.

Fix

Corrected the key spelling from 'embeded' to 'embedded' in the
reverse-framing branch, matching the spelling used at the two existing
forward-framing call sites.

Testing

Added test_frame_reverse_embed_never_is_respected in test_frame.py,
based on the reproduction case from the issue. Verified the test fails
on the unfixed code and passes with the fix. make lint passes.

@mielvds

mielvds commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator

Thanks @afeefaa333 ! Could you perhaps add a changelog entry?

@afeefaa333

Copy link
Copy Markdown
Contributor Author

Done, added a changelog entry under 4.0.0 - unreleased / Fixed.

@mielvds
mielvds merged commit 40ee368 into digitalbazaar:master Nov 17, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@embed: @never is ignored inside an @reverse frame

2 participants